<template>
  <div>
    <ui>
      <li v-for="(item, index) in user" :key="index">{{ item }}</li>
    </ui>
    <h2 @click="changes">{{ demo }}</h2>
  </div>
</template>

<script>
export default {
  name: 'DemoHeard',
  props: {
    user: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {
      demo: '点我变化',
    }
  },

  mounted() {},

  methods: {
    //自定义事假实现父子传值
    changes() {
      this.$emit('changedemo', '我变小白')
    },
  },
}
</script>

<style lang="scss" scoped>
</style>